<template>
	<div class="model" v-if="isShow">
		<h2 class="model__title">
			退换货详情
			<span @click="close" class="model__title--close">&times;</span>
		</h2>
		<div class="model__content" v-loading="loading">
			<div v-if="data">
				<div class="item">
					<h2 class="item__title">货物详情</h2>
					
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		props: ["id", "isShow"],
		data() {
			return {
				data: null,
				loading: true
			}
		},
		methods: {
			close() {
				this.$emit("closeModel");
			},
			fetchSupplierDetail() {
				this.loading = true;
				var url = `${this.url}/supplier/supplier_get_info.action`;
				var params = {
					supplier_id: this.id
				};
				this.$http.get(url,{ params }).then((res)=> {
					this.loading = false;
					this.data = res.data.result;
				});
			}
		},
		watch: {
			isShow(newVal) {
				if (newVal) {
					this.fetchSupplierDetail();
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	
</style>